Skip to main content

All Questions

Tagged with
12votes
3answers
3kviews

Pythonic way for validating and categorizing user input

In multiple parts of my program, user input needs to be validated and categorized. As these "validation trees" can get pretty unwieldy, I've started splitting them out in different functions,...
Jan van Wijk's user avatar
4votes
3answers
514views

Input validation of a signed double (in C++)

I am a beginner, who is just learning the language (C++) from C++ Primer. I have been trying to build a side pico-project by writing functions for validation of user input for an signed double. The ...
SogaBan's user avatar
5votes
2answers
350views

Chess Dictionary Validator from Automatic Boring Stuff with Python

This project is in chapter 5 introduced me to a whole new world of dictionary data structure. To put it briefly, I want to know whether the choice I took between lists, tuples, and dictionaries could'...
yfr's user avatar
  • 169
2votes
2answers
1kviews

Beginning BMI calculator in Java

This is my first program so no doubt I've made mistakes. The code works and meets all requirements as far as I can see. (Further info: program to calculate Body Mass Index (BMI) allowing user to ...
Julie Cohen's user avatar
0votes
2answers
103views

Python code to continue if a certain type is seen, otherwise try again to get valid input [closed]

I am very very new to programming, and this is my first day using Python. I want to check to see if an input is of type 'int' and to proceed with my program if the user has entered an 'int', ...
mystic96's user avatar
5votes
1answer
2kviews

Regex XML validator

I have written a Regex to validate XML/HTML, along with any attributes. It aims to: Match any XML-like text Not match any unclosed tags Adapt for any spacing, newlines, etc. Be as generous as possible:...
Geza Kerecsenyi's user avatar
3votes
2answers
168views

Checking the strength of a password using regexes

I'm a beginner in Python and I made a password checker. I'm following these rules: I have to use regex password must be at least 8 characters must have at least one lower case character must have at ...
Bid's user avatar
  • 33
5votes
1answer
78views

Add-in for input() with validation

What do you think about this code? Do you have some advices and remarks for me about them? I have started learning python recently. ...
Owl's user avatar
  • 204
1vote
2answers
513views

Input class in Java

I'm a newcomer to Java (I primarily do C# ) and I have to say that they have made I/O handling much more difficult than it should have been. I am accustomed to the scenario where when I need keyboard ...
NickDelta's user avatar
2votes
2answers
185views

Simple form validation in javascript

Used to use Laravel's easy to use form validation class, decided to mimic it in JS. I've been learning JS for 4 days now and decided to write my first piece of real code. I'm pretty sure its full of ...
Josh Hallow's user avatar
4votes
1answer
141views

Temperature converter in Rust with input error handling

I started learning Rust a few hours ago with the Rust Book (2018 edition) and as part of one of the exercises decided to make a temperature converter. I wanted to make sure it handled all inputs ...
Arnav Borborah's user avatar
21votes
8answers
47kviews

Program to check if a date is valid or not

I am a novice programmer and am currently learning Python programming by myself through a book. I stumbled upon a question in a chapter and it took me 2 days to figure out a solution for it. Although, ...
mathlover92's user avatar
3votes
1answer
2kviews

Convert string to double and check for errors

The following program converts a string to a double, and checks for errors. It uses the strtod() function to do the conversion, and follows the example given for ...
Domenic's user avatar
0votes
2answers
93views

jQuery function to display an alert when submitting blank fields

I am new to jquery and implemented following function in a js file in case of error- ...
AnalyticsPy's user avatar
1vote
1answer
3kviews

Form validation for multiple inputs

I created an example of a simple form for multiple inputs (name and phone number) in React. If the user enters invalid data in input field, error text is displayed near the same field. I learned a lot ...
Kate Herasimenak's user avatar

153050per page
close